import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import goods from 'components/goods/goods'
import ratings from 'components/ratings/ratings'
import seller from 'components/seller/seller'

// 引入需要打包的样式
import 'common/scss/index.scss'

Vue.use(VueRouter)
Vue.use(VueResource)

Vue.config.productionTip = false

var router = new VueRouter({
  routes: [
    { path: '/goods', component: goods },
    { path: '/ratings', component: ratings },
    { path: '/seller', component: seller }
  ],
  linkActiveClass: 'active'
})

/* eslint-disable no-new */
// 让eslint跳过不用新建一个对象必须用变量接收的检查
new Vue({
  el: '#app',
  render: h => h(App),
  router
})
